﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Volo.Abp.Domain.Entities.Auditing;
using System.ComponentModel.DataAnnotations.Schema;
using EcoSystem.Enums;

namespace EcoSystem
{
    /// <summary>
    /// 配置信息
    /// </summary>
    public class ConfigSetting : FullAuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 分类
        /// </summary>
        [MaxLength(128)]
        public string Category { get; set; }

        /// <summary>
        /// 键名
        /// </summary>
        [MaxLength(128)]
        public string Key { get; set; }

        /// <summary>
        /// 键值
        /// </summary>
        [Column(TypeName = "longtext")]
        public string Value { get; set; }

        /// <summary>
        /// 级别
        /// </summary>
        public ConfigLevel Level { get; set; }

        /// <summary>
        /// 系统模块/用户代码
        /// </summary>
        [MaxLength(128)]
        public string ProviderKey { get; set; }

        /// <summary>
        /// 系统模块代码
        /// </summary>
        [MaxLength(128)]
        public string ModuleCode { get; set; }

        /// <summary>
        /// 用途(前端或后端)
        /// </summary>
        public Usage Usage { get; set; }
    }
}
